export const checkApiLimit = (apiLimit: number, time: number) => {
  const requestLoggerList = JSON.parse(localStorage.getItem('requestLoggerList') || '[]')
  const now = Date.now()
  const requestCount = requestLoggerList.filter((item: { timestamp: number }) => now - item.timestamp > time).length
  return requestCount >= apiLimit
}